package com.zuoye.day04;

public class Account {
    public int bankId;
    public String rootName;
    public  String rootPhone;
    public int bankPassword;
    public long rootIdCard;
    public String email;
    public float accBalance;




    public Account(int bankId,String rootName,String rootPhone,int bankPassword,long rootIdCard,String email,float accBalance){
        this.bankId = bankId;
        this.rootName = rootName;
        this.rootPhone = rootPhone;
        this.bankPassword = bankPassword;
        this.rootIdCard = rootIdCard;
        this.email = email;
        this.accBalance = accBalance;

    }

    //存钱
    public float depoist(float balance){
        accBalance -= balance;
        return accBalance;
    }
    //取钱
    public float  withdraw(float balance){
        if(accBalance > balance){
            accBalance -= balance;
            return accBalance;
        }else {
            System.out.println("余额不足");
        }
        return accBalance;
    }

    public int getBankId() {
        return bankId;
    }

    public void setBankId(int bankId) {
        this.bankId = bankId;
    }

    public String getRootName() {
        return rootName;
    }

    public void setRootName(String rootName) {
        this.rootName = rootName;
    }

    public String getRootPhone() {
        return rootPhone;
    }

    public void setRootPhone(String rootPhone) {
        this.rootPhone = rootPhone;
    }

    public int getBankPassword() {
        return bankPassword;
    }

    public void setBankPassword(int bankPassword) {
        this.bankPassword = bankPassword;
    }

    public long getRootIdCard() {
        return rootIdCard;
    }

    public void setRootIdCard(long rootIdCard) {
        this.rootIdCard = rootIdCard;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public float getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(float accBalance) {
        this.accBalance = accBalance;
    }

    public Account(){

    }


}
